<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/default.xhtml">
   
   	<f:metadata>
	   	<f:viewParam name="recordId" value="#{assessRecordHome.id}"></f:viewParam>
   	</f:metadata>
   	
    <ui:define name="head">

    </ui:define>
    
   	<ui:define name="content">
		         
		<p:panel id="panel" header="查看信用记录" style="margin-bottom:10px;">
	        
	        <h:panelGrid columns="2" cellpadding="5">
				<p:outputLabel value="中介机构" />
				<h:outputText value="#{assessRecordHome.instance.serviceSupplier.cnname}" />
		        
		        <p:outputLabel value="所属评价事项：" />
		        <h:outputText value="#{assessRecordHome.instance.dict.title}" />
								
				
				<p:outputLabel value="分值：" />				
				<h:outputText value="#{assessRecordHome.instance.score}" />
					
				<p:outputLabel value="评价结果：" />
				<h:outputText value="#{assessRecordHome.instance.assessResult}" />
				
				<p:outputLabel value="图片材料" />
				<p:panel style="min-height:100px"
					id="imagePanel" widgetVar="imagePanel">
					<div id="imgsPreview"  style="display:inline-block">
						<p:repeat var="_image" value="#{assessRecordHome.instance.images}" varStatus="_status">
							<img  data-original="#{attachmentUtils.getFullPath(_image)}" src="#{attachmentUtils.getFullPath(_image)}"  width="240"/>
						</p:repeat>
					</div>
				</p:panel>	
				
				<p:outputLabel value="附件材料" />
				<p:panel id="uploadedAttachments">
					<ul>
						<p:repeat var="_attr" value="#{assessRecordHome.instance.attachments}" varStatus="_status">
							<li>
								<p:link value="#{_status.index + 1}、#{_attr.filename}" target="_blank" ajax="false" href="#{attachmentUtils.getFullPath(_attr)}" />、											
								<span>
									<p:commandLink styleClass="closeBtn" action="#{assessRecordHome.removeAttachment(_status.index)}" update="uploadedAttachments" immediate="true"  ></p:commandLink>															
								</span>
							</li>
						</p:repeat>
					</ul>
				</p:panel>
			</h:panelGrid>
		</p:panel>
		
		<p:panel header="审批情况">
			<p:graphicImage value="#{bpmHome.getProcessDiagramImage()}" style="width: 600px">
			    <f:param name="businessKey" value="#{assessRecordHome.instance.id}" />
			</p:graphicImage>
		</p:panel>
      
   	</ui:define>
</ui:composition>
